#pragma once
#include "Headers.h"
#include "OgreInterface.h"

//forms
#include "ConsoleForm.h"
#include "GameViewForm.h"
#include "HierarchyForm.h"
#include "InspectorForm.h"
#include "ProjectResourcesForm.h"
#include "ProjectSetupForm.h"
#include "SceneViewForm.h"
#include "SplashScreenForm.h"
#include "EditorOptionsForm.h"
//
#include "SceneViewManager.h"
#include "FileWatcher.h"
#include "EditorActionManager.h"


namespace OgreUnified {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	public ref class Mainform : public System::Windows::Forms::Form
	{
	public:
		Mainform::Mainform(void);

		static property Mainform^ Instance;

		void CloseAllDocuments();

		void SetStatusBarInfo(System::String^);

	protected:
		Mainform::~Mainform();

	private: 
		OgreInterface*	mOgreInterface;
		
		WeifenLuo::WinFormsUI::Docking::DockPanel^  	mDockPanel;
		System::Windows::Forms::MenuStrip^				mMenuStrip;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemFile;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemEdit;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemAssets;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemGameObjects;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemComponent;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemWindows;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemHelp;
		System::Windows::Forms::ToolStrip^				mToolStrip;
		System::Windows::Forms::ToolStripButton^		mToolStriputtonNew;
		System::Windows::Forms::ToolStripButton^		mToolStripButtonOpen;
		System::Windows::Forms::ToolStripButton^		mToolStripButtonSave;
		System::Windows::Forms::ToolStripButton^		mToolStripButtonPrint;
		System::Windows::Forms::ToolStripSeparator^		mToolStripSeparator;
		System::Windows::Forms::ToolStripButton^		mToolStripButtonCut;
		System::Windows::Forms::ToolStripButton^		mToolStripButtonCopy;
		System::Windows::Forms::ToolStripButton^		mToolStripButtonPaste;
		System::Windows::Forms::ToolStripSeparator^		mmToolStripFileSeparator2;
		System::Windows::Forms::ToolStripButton^		mToolStripButtonHelp;
		System::Windows::Forms::ToolStripContainer^		mToolStripContainer;
		System::Windows::Forms::StatusStrip^			mStatusStrip;
		System::Windows::Forms::ToolStripStatusLabel^	mToolStripStatusLabel;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemLayout;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemSave;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemLoad;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemConsole;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemGameView;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemSceneView;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemInspector;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemProject;
		System::Windows::Forms::ToolStripMenuItem^  	mToolStripMenuItemHierarchy;
		
		/*-------------File Menu ------------------------------------------------------*/
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemNewScene;
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemOpenScene;
		System::Windows::Forms::ToolStripSeparator^		mToolStripFileSeparator1;
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemSaveScene;
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemSaveSceneAs;
		System::Windows::Forms::ToolStripSeparator^		mToolStripFileSeparator2;
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemNewProject;
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemOpenProject;
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemSaveProject;
		System::Windows::Forms::ToolStripSeparator^		mToolStripFileSeparator3;
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemBuildSettings;
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemBuildRun;
		System::Windows::Forms::ToolStripSeparator^		mToolStripFileSeparator4;
		System::Windows::Forms::ToolStripMenuItem^		mToolStripMenuItemExit;

		System::ComponentModel::Container ^components;

		void InitializeComponent(void);
		IDockContent^ LoadLayoutCallback(System::String^ formName);
		void OnShown(Object^ o, System::EventArgs^ e);
		
		/*-------------------File menu callbacks-------------------------------------------------------*/
		System::Void mToolStripMenuItemNewScene_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemOpenScene_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemSaveScene_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemSaveSceneAs_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemNewProject_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemOpenProject_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemSaveProject_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemBuildSettings_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemBuildRun_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemExit_Click(System::Object^  sender, System::EventArgs^  e);

		/*-------------------Windows form menu callbacks-----------------------------------------------*/
		System::Void mToolStripMenuItemSave_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemLoad_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemConsole_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemGameView_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemSceneView_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemInspector_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemProject_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void mToolStripMenuItemHierarchy_Click(System::Object^  sender, System::EventArgs^  e);
		/*---------------------------------------------------------------------------------------------*/
		
			 
		System::Void Mainform_DragEnter(System::Object^  sender, System::Windows::Forms::DragEventArgs^  e);
		
	};
}

